Ray Strode [Fri, 24 Jun 2016 11:57:06 +0000 (07:57 -0400)]
headerbar: simplify some size allocation code
With a headerbar, the widget in the center may be a label, constructed
internally, or a custom widget, constructed externally. The size
allocation code needs to handle either case the same way for the most
part. There's more than one place in the code that checks which of
the two widgets to use and does some operation on the selected one.
This commit simplifies the code by checking up front which one is the
center (title) widget and storing that in a temporary variable,
This allows reducing duplicated logic later on in the function.
https://bugzilla.gnome.org/show_bug.cgi?id=724332
Ray Strode [Thu, 23 Jun 2016 20:31:24 +0000 (16:31 -0400)]
headerbar: simplify calculation in size allocation code
There's some extraneous MIN() calls that have predetermined answers.
This commit drops them and then simplifies a few redudant checks into
one MIN call.
https://bugzilla.gnome.org/show_bug.cgi?id=724332
Matthias Clasen [Thu, 23 Jun 2016 19:46:45 +0000 (15:46 -0400)]
Fix an array overrun
When I introduced the new input source enum value for
track points, I forgot that there is a fixed-size array
with names for those in the inspector.
Ray Strode [Thu, 23 Jun 2016 13:16:40 +0000 (09:16 -0400)]
headerbar: don't use GTK_PACK_* as indices into array
The size allocation code maintains an array of two elements,
to track the allocation of children packed into the two sides
of a header bar. Sometimes this array is indexed with 0 and 1,
and sometimes its indexed with GTK_PACK_START and GTK_PACK_END.
The latter happen to have the values 0 and 1, respectively, but
that's not really obvious.
For clarity, this commit changes the code to index those arrays
consistently, sticking to 0 and 1 across the board.
Ray Strode [Thu, 23 Jun 2016 12:57:55 +0000 (08:57 -0400)]
headerbar: don't allocate both label and custom title
It's only possible to have a label or a custom title, not both.
The size allocate code confusingly treats them as independent.
That is confusing, because, as the code is written, it makes it
look like the space for the custom title isn't getting accounted
for.
This commit else-ifies some parts of the size allocate code for
clarity.
Tiago Santos [Wed, 22 Jun 2016 13:12:03 +0000 (13:12 +0000)]
Updated Portuguese translation
Emmanuele Bassi [Wed, 22 Jun 2016 09:56:27 +0000 (10:56 +0100)]
gtk: Keep Firefox working in the DrawingContext world
Firefox does a bunch of interesting things with GTK.
If the top-level GtkWindow does not have a "csd" style class associated,
Firefox will happily draw the contents of the container used to render
HTML and XUL directly on the top level's GdkWindow; on the other hand,
if a "csd" style class is found, the MozContainer will create a new
child window, and draw on it.
Then, Firefox will proceed to disable double buffering on both the
top-level window and the MozContainer (unless they are backed by the
same GdkWindow, in which case only the top-level will be
single-buffered) *and* it will add a GDK_EXPOSURE_MASK flag to the
MozContainer events for good measure (even if this is only needed for
GTK+ 2.x).
After landing the GdkDrawingContext API in GdkWindow, GTK enabled
automatic double buffering on all top-level windows backed by a native
surface, ad most users of single buffering rely on child widgets instead
of top-levels, and we'd still like to have the same double buffering
behaviour for all top-levels on all backends. Obviously, with Firefox
disabling double buffering on the top-level window, the change broke
their drawing mechanism.
Ideally, Firefox could be fixed to not disable double buffering on the
top-level window when MozContainer has a separate GdkWindow — i.e. the
CSD case — but since we did introduce a slight change of behaviour in
fringe users of the GTK+ API, let's keep backwards compatibility with
the old code for a little while longer, and create an intermediate Cairo
context unbound from the GdkDrawingContext, like we used to do until
GTK+ 3.20.
Chun-wei Fan [Wed, 22 Jun 2016 07:16:09 +0000 (15:16 +0800)]
Visual Studio builds: Make .pc generation more flexible
Allow the use of ${exec_prefix} for libdir and includedir when passing
them in as arguments to the script.
Carlos Garnacho [Tue, 21 Jun 2016 11:57:20 +0000 (13:57 +0200)]
GtkColorEditor: Keep ref on pre-popup focus widget
And ensure it's still visible before returning the keyboard focus to it.
Because of the extra ref, add a dispose handler that will ensure the
ref is lost (by popping down), although this should be already ensured
through other paths (eg. when the popup widget loses visibility).
This fixes a possible crash in dispose paths, where we might be restoring
focus on an already destroyed widget, and at a time where, if the toplevel
is being itself disposed, no new focus should be set.
https://bugzilla.gnome.org/show_bug.cgi?id=767849
Carlos Garnacho [Tue, 21 Jun 2016 10:30:29 +0000 (12:30 +0200)]
demos: Simplify popovers demo
Don't do much unconventional stuff here. This is a demo, not a test.
https://bugzilla.gnome.org/show_bug.cgi?id=767851
Carlos Garnacho [Tue, 21 Jun 2016 10:24:05 +0000 (12:24 +0200)]
GtkPopover: Honor widget margins when calculating tail position
If there are widget margins set, the whole popover will be displaced.
However the calculation of the tail position doesn't have this into
account, ending up with the tail being detached from the popover if
the margin grew too big.
We should not render the arrows invariably next to the GdkWindow edge,
but optionally displaced inside it depending on the widget margins.
Fixes the gtk3-demo "Popovers" demo case, whose GtkEntry popovers set
widget margins for some reason.
https://bugzilla.gnome.org/show_bug.cgi?id=767851
Christian Hergert [Mon, 20 Jun 2016 22:17:00 +0000 (15:17 -0700)]
listbox: short-circuit if no sort function is set
do_sort will crash if sort_func is not defined. Instead of adding a check
there in the hot path, just check for sort_func before invalidating the
sort of the underlying GSequence.
Matthias Clasen [Mon, 20 Jun 2016 18:17:07 +0000 (14:17 -0400)]
3.21.3
Matthias Clasen [Mon, 20 Jun 2016 19:26:26 +0000 (15:26 -0400)]
Skip GdkDrawingContext in some tests
GdkDrawingContext is not freely constructible, so we need
to skip it in the notify and finalize tests.
Olivier Fourdan [Mon, 20 Jun 2016 13:52:32 +0000 (15:52 +0200)]
wayland: do not set PRIMARY selection if focus is lost
If keyboard focus is (already) lost, do not advertise PRIMARY selection.
https://bugzilla.gnome.org/show_bug.cgi?id=767848
Matthias Clasen [Mon, 20 Jun 2016 04:20:01 +0000 (00:20 -0400)]
Updates
Matthias Clasen [Mon, 20 Jun 2016 03:54:07 +0000 (23:54 -0400)]
gtk3-demo: Make the filter model example more interesting
Allow editing values in the first treeview, to see the derived
models update in real time.
Matthias Clasen [Mon, 20 Jun 2016 03:24:44 +0000 (23:24 -0400)]
shortcuts: Try harder to disambiguate search items
I noticed that some of the gestures did not show up in the
search results in the builder example in gtk3-demo, because
they share the same title and don't have an accelerator to
disambiguate. Include the shortcut type to handle this case.
Matthias Clasen [Mon, 20 Jun 2016 03:07:17 +0000 (23:07 -0400)]
gtk-demo: Use max-content-height in the popover example
This is what the property was invented for.
Matthias Clasen [Mon, 20 Jun 2016 02:56:20 +0000 (22:56 -0400)]
gtk3-demo: Fix the modelbutton example
The color menu buttons didn't have the necessary target property
to be successfully activated.
Matthias Clasen [Mon, 20 Jun 2016 02:47:57 +0000 (22:47 -0400)]
gtk-demo: Fix up some warnings
The search entry example was a bit sloppy in cleaning up its
sources, causing warnings.
Matthias Clasen [Mon, 20 Jun 2016 02:23:06 +0000 (22:23 -0400)]
Add a release note for scrolled windows
Mention the changed sizing behavior and how to address it.
Matthias Clasen [Mon, 20 Jun 2016 02:16:11 +0000 (22:16 -0400)]
widget factory: Adapt to new scrolled window behavior
Set a max-content-width on some of the scrolled windows to
keep things looking mostly the same, now that GtkScrolledWindow
passes along the natural size of its child.
Carlos Garnacho [Mon, 13 Jun 2016 21:44:31 +0000 (23:44 +0200)]
treeview: Ensure the treeview has the implicit grab before grabbing focus
The cellrenderer signals might be taking the grab somewhere else, at which
point it's dubious we should attempt to take the keyboard focus into the
treeview.
This concretely breaks popovers triggered from cellrenderer signals on
button press, because the treeview will attempt to grab focus
inconditionally then.
https://bugzilla.gnome.org/show_bug.cgi?id=767468
Matthew Leeds [Wed, 15 Jun 2016 20:41:58 +0000 (16:41 -0400)]
GtkActionHelper: Change a message to a warning
It's almost certainly a programmer error if an action isn't
activatable because its target and parameter type don't match.
This commit changes the existing g_message to a g_warning.
https://bugzilla.gnome.org/show_bug.cgi?id=767705
Philip Chimento [Thu, 16 Jun 2016 03:02:11 +0000 (23:02 -0400)]
style cascade: Allow cascades with more ancestors
Previously a style cascade's parent could not have a parent itself. That
represented the two levels at which you could add a style provider: at
the screen level, with gtk_style_context_add_provider_for_screen(), and
at the style context level, with gtk_style_context_add_provider().
This commit changes no functionality, but this change will be necessary
for adding style providers in the future that apply to a subtree of the
widget tree. It relaxes the requirement that a style cascade's parent
must not have a parent, since in the future a style context may be
affected by any number of parent widgets' style contexts.
https://bugzilla.gnome.org/show_bug.cgi?id=751409
Matthias Clasen [Sun, 19 Jun 2016 21:49:03 +0000 (17:49 -0400)]
shortcuts window: Fix handling of significant xml chars
We are using markup in the labels, so we need to escape things
like < and >.
https://bugzilla.gnome.org/show_bug.cgi?id=767795
Rafael Fontenelle [Sat, 18 Jun 2016 00:29:01 +0000 (00:29 +0000)]
Updated Brazilian Portuguese translation
Rafael Fontenelle [Fri, 17 Jun 2016 23:53:20 +0000 (23:53 +0000)]
Updated Brazilian Portuguese translation
Misty De Meo [Thu, 16 Jun 2016 22:59:27 +0000 (15:59 -0700)]
configure: fix detecting CUPS 2.x
https://bugzilla.gnome.org/show_bug.cgi?id=767766
Ray Strode [Thu, 12 May 2016 19:52:12 +0000 (15:52 -0400)]
wayland: fall back to shm_open if memfd unavailable
Debian stable currently ships with a 3.16 kernel, so
it doesn't have memfd available.
This commit adds shm_open fall back code for that case
(for now).
https://bugzilla.gnome.org/show_bug.cgi?id=766341
Ray Strode [Mon, 16 May 2016 14:20:10 +0000 (10:20 -0400)]
wayland: fix error handling for memfd_create
We currently use syscall() directly to invoke memfd_create,
since the function isn't available in libc headers yet.
The code, though, mishandles how errors are passed from syscall().
It assumes syscall returns the error code directly (but negative),
when in fact, syscall() uses errno.
Also, the code fails to retry on EINTR.
This commit moves the handling of memfd create to a helper function,
and changes the code to use errno and handle EINTR.
https://bugzilla.gnome.org/show_bug.cgi?id=766341
Krzesimir Nowak [Thu, 16 Jun 2016 10:19:54 +0000 (12:19 +0200)]
docs: Fix a typo in GDK sections file
Matthias Clasen [Thu, 9 Jun 2016 12:05:11 +0000 (08:05 -0400)]
Mention single-stop gradients in the release notes
This is something people stumble over in their custom CSS.
Daniel Mustieles [Mon, 13 Jun 2016 13:17:11 +0000 (13:17 +0000)]
Updated Spanish translation
Emmanuele Bassi [Sun, 12 Jun 2016 17:55:34 +0000 (18:55 +0100)]
gdk: Unset the DrawingContext <-> cairo_t link on dispose
When disposing a GdkDrawingContext we should unset the association
between the instance and the Cairo context; this avoids stale pointers
in case a reference that has acquired on the Cairo context survives the
lifetime of the GdkDrawingContext.
Emmanuele Bassi [Fri, 10 Jun 2016 16:00:29 +0000 (17:00 +0100)]
gdk: Try harder at tracking drawing contexts
If gdk_cairo_create() is called within a frame draw operation, we can
still associate the Cairo context with a GdkDrawingContext.
GNOME Translation Robot [Sat, 11 Jun 2016 07:54:43 +0000 (07:54 +0000)]
Updated Scottish Gaelic translation
GNOME Translation Robot [Fri, 10 Jun 2016 15:35:34 +0000 (15:35 +0000)]
Updated Scottish Gaelic translation
GNOME Translation Robot [Fri, 10 Jun 2016 15:15:27 +0000 (15:15 +0000)]
Updated Scottish Gaelic translation
Emmanuele Bassi [Fri, 10 Jun 2016 12:55:30 +0000 (13:55 +0100)]
Deprecate gtk_widget_send_expose()
We have various replacements for what this function does, and we are not
calling it internally any more.
Tristan Van Berkom [Fri, 10 Jun 2016 12:16:53 +0000 (21:16 +0900)]
scrolledwindow: Fix calls to gdk_window_move_resize()
This is a bit of fallout from
34feba1, now that we resolve
the has_indicators value earlier than realize, it becomes
possible to call gdk_window_move_resize() before realization.
Just added the appropriate checks.
Stefan Sauer [Thu, 9 Jun 2016 20:37:53 +0000 (22:37 +0200)]
docs: point to suggested api for deprecated functions
We deprecated a bunch of _focus_on_click() functions. Point to the new API
in GtkWidget.
Emmanuele Bassi [Thu, 9 Jun 2016 20:35:36 +0000 (21:35 +0100)]
docs: Add deprecation notice for GtkButton.set_focus_on_click()
To match the deprecation annotation on the function declaration.
Emmanuele Bassi [Thu, 9 Jun 2016 20:00:13 +0000 (21:00 +0100)]
Avoid a deprecation warning
Some debugging code in GdkWindow still calls gdk_cairo_create().
Emmanuele Bassi [Tue, 7 Jun 2016 16:06:47 +0000 (17:06 +0100)]
gdk: Deprecate gdk_cairo_create()
We have GdkDrawingContext, now, which is in charge of creating Cairo
contexts for drawing on a GdkWindow.
https://bugzilla.gnome.org/show_bug.cgi?id=766675
Emmanuele Bassi [Tue, 7 Jun 2016 15:52:50 +0000 (16:52 +0100)]
gdk: Explicitly create a cairo context inside GdkDrawingContext
Instead of using gdk_cairo_create(), which we'll soon deprecate.
https://bugzilla.gnome.org/show_bug.cgi?id=766675
Emmanuele Bassi [Tue, 7 Jun 2016 15:40:43 +0000 (16:40 +0100)]
Deprecate the gdk_window_begin/end_paint family of functions
They are replaced by the more appropriate gdk_window_begin_draw_frame()
and gdk_window_end_draw_frame() functions.
https://bugzilla.gnome.org/show_bug.cgi?id=766675
Emmanuele Bassi [Tue, 7 Jun 2016 15:34:50 +0000 (16:34 +0100)]
Associate the drawing context to the Cairo context
Instead of associating the GdkWindow that created the GdkDrawingContext
we can directly bind the Cairo context to the GDK drawing context.
Cairo contexts created via gdk_cairo_create() go back to not having a
GdkWindow associated to them, like they did before we introduced the
gdk_window_begin_draw_frame() API.
https://bugzilla.gnome.org/show_bug.cgi?id=766675
Emmanuele Bassi [Mon, 6 Jun 2016 11:30:46 +0000 (12:30 +0100)]
docs: Add GdkDrawingContext to the GDK API reference
https://bugzilla.gnome.org/show_bug.cgi?id=766675
Emmanuele Bassi [Mon, 30 May 2016 08:44:30 +0000 (09:44 +0100)]
Add GdkDrawingContext
Instead of giving out Cairo contexts, GdkWindow should provide a
"drawing context", which can then create Cairo contexts on demand; this
allows us to future proof the API for when we're going to use a
different rendering pipeline, like OpenGL.
https://bugzilla.gnome.org/show_bug.cgi?id=766675
Emmanuele Bassi [Fri, 20 May 2016 15:59:51 +0000 (16:59 +0100)]
Simplify the widget rendering entry point
Now that GDK has the appropriate API, we can simplify the widget drawing
code into a single function.
https://bugzilla.gnome.org/show_bug.cgi?id=766675
Emmanuele Bassi [Fri, 20 May 2016 15:55:12 +0000 (16:55 +0100)]
Add frame drawing API to GdkWindow
Existing code drawing on a GDK window has to handle the direct drawing
and the buffered drawing by itself, by checking the window type and
whether or not the window is backed by a native windowing surface. After
that, the calling code has to create a Cairo context from the window and
keep an association between the context and the window itself.
This is completely unnecessary: GDK can determine whether or not it
should use a backing store to draw on a GdkWindow as well as create a
Cairo context, and keep track of it.
This allows to simplify the calling code, and enforce some of the
drawing behavior we want to guarantee to users.
https://bugzilla.gnome.org/show_bug.cgi?id=766675
Tristan Van Berkom [Tue, 7 Jun 2016 05:02:37 +0000 (14:02 +0900)]
scrolledwindow test: Check natural width for max content size
The maximum content size does not increase the minimum request
but only ensures that both minimum and natural requests do not
exceed the maximum setting.
Tristan Van Berkom [Tue, 7 Jun 2016 05:09:28 +0000 (14:09 +0900)]
scrolledwindow: Resolve whether we use overlay scrollbars early.
Widgets should support size requests before being realized in general,
otherwise this can cause flicker/resize at initial display time as
the toplevel window can make a request before realize/allocate.
This also makes the added testsuite/gtk/scrolledwindow.c test work again,
this was broken because we only ever calculate whether we are going
to use overlay scrollbars once the scrolled window is realized (and
the test case does not realize any window).
Tristan Van Berkom [Tue, 7 Jun 2016 05:04:42 +0000 (14:04 +0900)]
scrolledwindow: Bug 766569 - General size request fixes.
This patch does a couple of things:
o Removes the obscure 'extra_width' and 'extra_height' variables
making the request code exceedingly difficult to read
o Fixes the max-content-size properties introduced in bug 742281
so that they do not grow the minimum request.
o Cleanup of request code in general:
- min/max content sizes are clamped around the child request as needed
- scrollbar requests are only added in one place, after child request
sizes are calculated and without the extra_width/height thing.
Emmanuele Bassi [Wed, 8 Jun 2016 13:20:02 +0000 (14:20 +0100)]
Fix build
Commit
023f406c9617284ee3b88727df489f20cd066fd6 has a typo that results
in this error:
../../../testsuite/gtk/notify.c: In function 'test_type':
../../../testsuite/gtk/notify.c:679:54: error: expected expression
before ')' token
(g_str_equal (pspec->name, "max-content-width") ||)
^
Timm Bäder [Wed, 8 Jun 2016 05:31:45 +0000 (07:31 +0200)]
wayland: Make sure window titles fit into a wl_buffer
A wl_buffer has a max size of 4096 bytes, of which 8 are needed for the
header and another 4 for the string argument length (in this case), so
make sure the we only save the first 4083 bytes that are still valid
UTF8.
https://bugzilla.gnome.org/show_bug.cgi?id=767241
Matthias Clasen [Wed, 8 Jun 2016 13:03:12 +0000 (09:03 -0400)]
test: Skip GtkScrolledWindow::max-content- properties
The allowed values for the max-content- properties depend
on the value of the min-content- properties, in a way that
our simple test is not prepared to deal with. Just skip
them for now.
Olivier Fourdan [Wed, 25 May 2016 13:07:51 +0000 (15:07 +0200)]
wayland: add extended state for tiled
xdg-shell allows desktop environments to extend the list of states
within a given range.
Use this possibility to add a new state for tiled so that gtk+ can
benefit from this.
https://bugzilla.gnome.org/show_bug.cgi?id=766860
Jakub Steiner [Wed, 8 Jun 2016 10:15:55 +0000 (12:15 +0200)]
HC: focus outline more prominent
- make visible regardless of colors used
- make larger and more inset
https://bugzilla.gnome.org/show_bug.cgi?id=767310
Lapo Calamandrei [Wed, 8 Jun 2016 11:39:39 +0000 (13:39 +0200)]
Adwaita: .osd button.color
remove box-shadow from colorbutton colorswatch when an ancestor has
the osd styleclass applied.
Lapo Calamandrei [Wed, 8 Jun 2016 11:28:07 +0000 (13:28 +0200)]
Adwaita: centralize outline-color
define outline-color generally using alpha(currentColor, 0.3),
which avoids setting it in a bunch of different places.
Kjell Ahlstedt [Wed, 8 Jun 2016 08:30:22 +0000 (10:30 +0200)]
Make gtk_scrolled_window_remove() smart
If gtk_scrolled_window_add() has added a GtkViewport,
gtk_container_remove (GTK_CONTAINER (scrolled_window), child_widget);
or
gtk_container_remove(GTK_CONTAINER(scrolled_window),
gtk_bin_get_child(GTK_BIN(scrolled_window)));
removes both the added child widget and the viewport.
https://bugzilla.gnome.org/show_bug.cgi?id=710471
Matthias Clasen [Wed, 8 Jun 2016 03:40:32 +0000 (23:40 -0400)]
Update GtkLabel::angle docs
We can have wrapped or ellipsized labels at an angle nowadays.
Still no selections though.
Matthias Clasen [Wed, 8 Jun 2016 03:04:40 +0000 (23:04 -0400)]
scale, spinbutton: Avoid -0.0
This is a very longstanding bug; time to finally put it to rest.
https://bugzilla.gnome.org/show_bug.cgi?id=118959
Matthias Clasen [Wed, 8 Jun 2016 01:28:44 +0000 (21:28 -0400)]
Ensure that GtkRange allocates enough space for the value
This is a long-standing problem of GtkScale.
https://bugzilla.gnome.org/show_bug.cgi?id=766372
https://bugzilla.gnome.org/show_bug.cgi?id=578626
https://bugzilla.gnome.org/show_bug.cgi?id=79229
Matthias Clasen [Tue, 7 Jun 2016 20:35:06 +0000 (16:35 -0400)]
Fix preconditions in set_max_content_size setters
We must allow resetting the properties to -1.
Benjamin Otte [Tue, 7 Jun 2016 14:08:52 +0000 (16:08 +0200)]
widget: Add classes to widget path even if no style context exists yet
This removes leftover code from when classes where added to the style
context.
Now that they get added directly to css nodes, the classes can exist
without a style context.
https://bugzilla.gnome.org/show_bug.cgi?id=767312
Carlos Garnacho [Mon, 6 Jun 2016 22:27:19 +0000 (00:27 +0200)]
searchenginetracker: Fix prefix searches
With the FTS5 query syntax, when using quotes to delimit the search phrase
the '*' token must happen after the quote, or will otherwise be considered
a character to match, go through the tokenizer, and end up ignored in
result.
Matthias Clasen [Mon, 6 Jun 2016 18:29:27 +0000 (14:29 -0400)]
Revert "scrolledwindow: Bug 766569 - Report child natural size unconditionally"
This reverts commit
0943c9f6b2c3ad5827ae5d8f3742f75e72782e41.
The commit caused unexpected breakage in gtk3-widget-factory,
and also broke the just-added max-content-size properties.
Matthias Clasen [Mon, 6 Jun 2016 18:33:25 +0000 (14:33 -0400)]
widget-factory: Use max-content-size in a popover
This gives a nice example of these properties in action,
in the "Open" popover on page 3.
Tristan Van Berkom [Mon, 6 Jun 2016 02:55:44 +0000 (11:55 +0900)]
scrolledwindow: Bug 767238 - Fixing up for max content sizes
Needed to adjust this again after applying commit
4e5ecb7
for bug 742281. Now that we also have max content size properties,
pushed the addition of possible scrollbar sizes to after the
clause which clamps the child request size into min/max content
sizes.
Phillip Wood [Mon, 25 Apr 2016 12:16:21 +0000 (13:16 +0100)]
Fix hiding popover when focus moves outside
Commit
a01fe14 changed the behaviour of popovers when the focus leaves
them to stop child popovers being hidden when the focus leaves their
parent. However they are now a bit too reluctant to hide - if the
focus passes to an unrelated popover the first popover is not
hidden. Also if the focus passes to another widget that does not
perform a gtk grab then the popover isn't hidden until the user
presses a non-movement key or clicks outside the popover.
The solution is to go back to checking if the focused widget is a
descendant of the popover, but to include popovers and their related
widgets in the ancestry chain.
https://bugzilla.gnome.org/show_bug.cgi?id=765595
Tristan Van Berkom [Sat, 4 Jun 2016 11:57:23 +0000 (20:57 +0900)]
scrolledwindow: Bug 766569 - Report child natural size unconditionally
This patch causes the scrolled window default behavior to change in
such a way that the natural size request of the child is unconditionally
reported, which probably should have been the case since day 1.
This should not cause significant fallout since a scrolled window is
normally used to expand/fill, eating up remaining space for scrollable
content - it will however cause the scrolled window to compete for
additional space with siblings, proportionally to the size of the
scrolled window's content.
Matthias Clasen [Mon, 6 Jun 2016 02:20:38 +0000 (22:20 -0400)]
treeview: fix an off-by-one error
gtk_tree_view_get_path_at_pos() mistakenly identifies the first
pixel of all but the first column in a tree view as belonging to
the previous column.
https://bugzilla.gnome.org/show_bug.cgi?id=708148
Christian Dywan [Tue, 14 Oct 2008 12:33:00 +0000 (12:33 +0000)]
object test: Also test object type properties
Old patch found in bugzilla, it still applies and doesn't
cause the test to fail.
https://bugzilla.gnome.org/show_bug.cgi?id=556254
Matthias Clasen [Mon, 6 Jun 2016 01:47:16 +0000 (21:47 -0400)]
Make gtk_tooltip_trigger_tooltip_query work again
This was broken ever since we started looking at the
source device of the event.
https://bugzilla.gnome.org/show_bug.cgi?id=674215
Matthias Clasen [Mon, 6 Jun 2016 00:54:49 +0000 (20:54 -0400)]
inspector: Ellipsize accessible description.
This string can be long, and we don't want to break the ui
Matthias Clasen [Sun, 5 Jun 2016 23:36:36 +0000 (19:36 -0400)]
viewport: Free gadgets in finalize
This is the right place for this.
Matthias Clasen [Sun, 5 Jun 2016 23:36:09 +0000 (19:36 -0400)]
scrolled window: Free gestures and gadgets in finalize
This is the right place for this.
Matthias Clasen [Sun, 5 Jun 2016 23:35:36 +0000 (19:35 -0400)]
range: Free gadgets in finalize
This is the right place for this.
Matthias Clasen [Sun, 5 Jun 2016 23:35:12 +0000 (19:35 -0400)]
notebook: Free gadgets in finalize
This is the right place for this.
Matthias Clasen [Sun, 5 Jun 2016 23:34:30 +0000 (19:34 -0400)]
menu: Free gadgets in finalize
This is the right place to do this.
Matthias Clasen [Sun, 5 Jun 2016 23:33:21 +0000 (19:33 -0400)]
button: Free gadgets and gestures in finalize
This is the right place to free them.
Georges Basile Stavracas Neto [Fri, 3 Jun 2016 01:32:56 +0000 (22:32 -0300)]
testsuite: add tests for scrolledwindow
This patch adds a set of tests for scrolled window
sizing, covering both min- and max-content width and
height.
https://bugzilla.gnome.org/show_bug.cgi?id=742281
Georges Basile Stavracas Neto [Thu, 2 Jun 2016 02:32:35 +0000 (23:32 -0300)]
tests: adapt testscrolledwindow to have max content sizes
This patch adpats the current test to show a popover with
max-content-width and -height properties set.
https://bugzilla.gnome.org/show_bug.cgi?id=742281
Georges Basile Stavracas Neto [Thu, 2 Jun 2016 02:18:37 +0000 (23:18 -0300)]
scrolledwindow: add ::max-content-width and -height properties
The GtkScrolledWindow has support to set the minimum content size (both
width and height) which controls the minimum space allocated, but does
not exposes any way to control the maximum size the content can grow.
After the introduction of GtkPopover, which always uses the minimum
size of it's children widgets, the lack of max-content-width and -height
properties became a concrete use case.
This patch introduces the GtkScrolledWindow::max-content-width and
-height properties. The properties will alter the minimum size of
the scrolled window, making it grow up to the set value. They also
respect the previously set ::min-content-width and -height.
https://bugzilla.gnome.org/show_bug.cgi?id=742281
Руслан Ижбулатов [Sun, 5 Jun 2016 07:37:02 +0000 (07:37 +0000)]
GDK W32: Fix dragging AeroSnap application
The original patch for commit
b420c53773ca5119afb43f0f351cb8f33c2bcaf9
was applied incorrectly, doing the actual snapping in the wrong place.
Move the code.
Matthias Clasen [Fri, 3 Jun 2016 20:30:00 +0000 (16:30 -0400)]
progressbar: Render text with the text css node
This is the same fix that was just applied to GtkScale.
Matthias Clasen [Fri, 3 Jun 2016 14:49:29 +0000 (10:49 -0400)]
scale: Also queue a resize if font changes
As Benjamin pointed out, what AFFECTS_FONT can also affect size,
but the implication is not automatic, so queue a resize manually.
Pavel Grunt [Thu, 2 Jun 2016 13:35:38 +0000 (15:35 +0200)]
gdktypes: Update docs for GDK_GRAB_FAILED
Mention in documentation that it is available since 3.16
https://bugzilla.gnome.org/show_bug.cgi?id=767165
Matthias Clasen [Fri, 3 Jun 2016 04:30:59 +0000 (00:30 -0400)]
scale: Apply css style to text
Use the new functions we have to apply CSS styles to the
value and marks text from their respective subnodes.
Matthias Clasen [Fri, 3 Jun 2016 04:29:05 +0000 (00:29 -0400)]
Add a function to get a font from a css style
Similar in spirit to
gtk_style_context_get (ctx, state, "font", ...)
but avoids the need for a style context.
This will be used to for css-styled text rendering
from css subnodes.
Matthias Clasen [Fri, 3 Jun 2016 04:19:24 +0000 (00:19 -0400)]
Add a function to turn a css style into pango attributes
This is _gtk_style_context_get_pango_attributes, decoupled
from the GtkStyleContext. This will be used to drive css-styled
text rendering from css subnodes of widgets, e.g. for the value
in GtkScale.
Timm Bäder [Thu, 2 Jun 2016 19:52:11 +0000 (21:52 +0200)]
widget: Avoid a deprecation warning
Matthias Clasen [Wed, 1 Jun 2016 03:33:54 +0000 (23:33 -0400)]
Show a scroll cursor when appropriate
When doing two-finger scrolling or click scrolling using a
trackpoint, show the all-scroll cursor to indicate what is
going on.
https://bugzilla.gnome.org/show_bug.cgi?id=753202
Matthias Clasen [Wed, 1 Jun 2016 03:14:30 +0000 (23:14 -0400)]
wayland: Provide information about scroll devices
The Wayland protocol does not share XI2's wealth of information
about individual devices, but it does provide discriminating
information about the source for scroll events. Pass this on to
the application by creating separate slave devices for these,
and setting them as source device on the scroll events.
These devices can be discriminated by their input-source property:
wheel - GDK_SOURCE_MOUSE
finger - GDK_SOURCE_TOUCHPAD
continuous - GDK_SOURCE_TRACKPOINT
https://bugzilla.gnome.org/show_bug.cgi?id=767093
fix up
Matthias Clasen [Wed, 1 Jun 2016 18:18:46 +0000 (14:18 -0400)]
a11y tests: Update expected output
These changes were caused by the introduction of GtkStackAccessible.
Matthias Clasen [Wed, 1 Jun 2016 17:12:19 +0000 (13:12 -0400)]
button css node test: Update for switch style changes
We no longer add the redundant .slider style class in GtkSwitch.
Update expected results to reflect that.